<?php
include "db.php"; include "encriptacion.php"; include "funcion.php";
$p=mysql_real_escape_string (quitar ($_REQUEST['searchid']));
$query = "SELECT * FROM st_usuarios WHERE (nombre LIKE  '%$p%' OR app LIKE  '%$p%' OR amat LIKE  '%$p%' OR correo LIKE  '%$p%') AND personal_id='2'";
   $result = mysql_query($query);
	$cuantos = mysql_num_rows($result);  
if ($cuantos!=0)
{
	echo "<table align='center' border='1'>
	 <thead><tr><th>Nombre</th>
	<th>Correo</th>
	<th>Telefono</th>
	<th colspan='2'>Acción</th></tr> </thead>";

	for($y=0;$y<$cuantos;$y++)
	{
	$nombre= mysql_result($result,$y,'nombre');
	$appat= mysql_result($result,$y,'app');
	$apmat= mysql_result($result,$y,'amat');
	$tel= mysql_result($result,$y,'telefono');
	$email= mysql_result($result,$y,'correo');
	  	echo "<tbody><tr><td>$nombre $appat $apmat</a></td>";
		echo "<td>$email</td>";
		echo "<td>$tel</td>";
		echo "<td>";
		$prueba=encode_this("email=$email");
		$url="change_admclub.php?".$prueba."";
		echo "<a href='$url'>Modificar</a></td>";
		echo "<td><a href='#'>Eliminar</a></td>";
echo"</td></tr>";
	}
	echo "</tbody></table><br>";
}
else 
{
	echo "No se encontrarón resultados.";
}
?>